<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta /-->
    <script src="../../plugins/jQuery/jquery-2.2.3.min.js"></script>
    <!-- 加载js文件-->
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/pageJs/template/general_template.js"></script>
    <%--JQuery调用cookie方法--%>
    <script src="${pageContext.request.contextPath}/common/bootstrap/js/jquery.cookie.js" type="text/javascript"
            charset="utf-8"></script>
    <%--样式--%>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <%--下拉多选--%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/common/bootstrap/js/bootstrap-select.js">
    </script>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/common/bootstrap/css/bootstrap-select.css">
    <style>
        body {
            background-image: url("../../images/yy1.jpg");
            background-repeat: no-repeat;
            background-size: 1600px 700px;
        }
    </style>
    <script type="text/javascript">
        $(window).on('load', function () {
            $('.selectpicker').selectpicker({
                'selectedText': 'cat'
            });
        });
    </script>
</head>
<body>

<h3 style="height: 60px;padding-top:40px; text-align: center;"><b>通用模板选择</b></h3>
<hr>
<div style="border: 1px solid black; height: 400px; width: 850px; margin: 50px auto;">
    <br/>
    <div class="col-xs-12 col-xs-offset-2" style="font-size: 20px">
        <div class="form-group col-sm-5">
            <label class="control-label"><input type="checkbox" id="patients_input" style="height: 20px; width: 20px;"/>基本信息
                <select name="patients" class="selectpicker col-sm-1 show-tick" style="width: 20px" multiple
                        data-live-search="true"
                        id="patient_id">
                </select>
            </label>
        </div>
        <div class="form-group col-sm-3">
            <label class="control-label"><input type="checkbox" id="medication_input"
                                                style="height: 20px; width: 20px;"/>用药
                <select name="patients" class="selectpicker col-sm-1  show-tick " style="width: 20px" multiple
                        data-live-search="true" id="medication_id">
                </select>
            </label>
        </div>

    </div>
    <div class="col-xs-12 col-xs-offset-2" style="font-size: 20px">
        <div class="form-group col-sm-5">
            <label class="control-label"><input type="checkbox" id="anemia_input" style="height: 20px; width: 20px;"/>体格检查
                <select name="patients" class="selectpicker col-sm-1 show-tick" style="width: 20px" multiple
                        data-live-search="true"
                        id="anemia_id">
                </select>
            </label>
        </div>
        <div class="form-group col-sm-3">
            <label class="control-label"><input type="checkbox" id="medicalHistory_input"
                                                style="height: 20px; width: 20px;"/>既往史
                <select name="patients" class="selectpicker col-sm-1" style="width: 20px" multiple
                        data-live-search="true" id="medicalHistory_id">
                </select>
            </label>
        </div>

    </div>
    <div class="col-xs-12 col-xs-offset-2" style="font-size: 20px">
        <div class="form-group col-sm-5">
            <label class="control-label"><input type="checkbox" id="chemicalExposureHistory_input"
                                                style="height: 20px; width: 20px;"/>实验室检查
                <select name="patients" class="selectpicker col-sm-1" style="width: 20px" multiple
                        data-live-search="true" id="chemicalExposureHistory_id">
                </select>
            </label>
        </div>
        <div class="form-group col-sm-3">
            <label class="control-label"><input type="checkbox" id="diagnosticInformationSheet_input"
                                                style="height: 20px; width: 20px;"/>临床诊断
                <select name="patients" class="selectpicker col-sm-1" style="width: 20px" multiple
                        data-live-search="true"
                        id="diagnosticInformationSheet_id">
                </select>
            </label>
        </div>
    </div>
    <div class="col-xs-12 col-xs-offset-2" style="font-size: 20px">
        <div class="form-group col-sm-5">
            <label class="control-label"><input type="checkbox" id="chestImaging_input"
                                                style="height: 20px; width: 20px;"/>影像学检查
                <select name="patients" class="selectpicker col-sm-1" style="width: 20px" multiple
                        data-live-search="true" id="chestImaging_id">
                </select>
            </label>
        </div>
        <div class="form-group col-sm-6">
            <label class="control-label"><input type="checkbox" id="score_input" style="height: 20px; width: 20px;"/>评分表
                <select name="patients" class="selectpicker col-sm-1" style="width: 20px" multiple
                        data-live-search="true"
                        id="score_id">
                </select>
            </label>
        </div>

    </div>
    <div class="col-xs-12 col-xs-offset-4" style="margin-top: 5px">
        <div class="col-sm-12">
            <button type="button" style="width: 200px; height: 30px; font-size: 16px;" id="general_template_id">确认/合并
            </button>
        </div>
    </div>
</div>
</body>
<script>
    $(function () {
        $("#general_template_id").click(function () {
            var ids = [];
            $("select[name='patients'] option:selected").each(function (i) {
                ids.push($(this).val())
            });
            var ides = "";
            for (var i = 0; i < ids.length; i++) {
                ides += ids[i] + "-";
            }
            location.href = "general_template2.jsp?id=" + ides + "";
        })
    })
</script>
</html>